package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EventHandlingAddDTO;
import org.jsola.hr.dto.EventHandlingUpdateDTO;
import org.jsola.hr.query.EventHandlingQuery;
import org.jsola.hr.vo.EventHandlingListVO;
import org.jsola.hr.vo.EventHandlingVO;

import java.util.List;

/**
 * 事件处理
 *
 * @author zhr
 */
@Api(tags = "hr-事件处理")
public interface IEventHandlingControllerAPI {

    /**
     * 新增事件处理
     * @param eventHandlingAddDTO 事件处理新增实体
     * @return 事件处理展示对象
     */
    @ApiOperation(value = "新增事件处理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingAddDTO", dataType = "EventHandlingAddDTO", value = "新增事件处理", paramType = "body")
    })
    Result<EventHandlingVO> save(EventHandlingAddDTO eventHandlingAddDTO);


    /**
     * 修改事件处理
     * @param eventHandlingUpdateDTO 事件处理
     * @return 更新数量
     */
    @ApiOperation(value = "修改事件处理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingUpdateDTO", dataType = "EventHandlingUpdateDTO", value = "修改事件处理", paramType = "body")
    })
    Result<Integer> update(EventHandlingUpdateDTO eventHandlingUpdateDTO);




    /**
     * 删除单个事件处理，彻底删除
     * @param eventHandlingId 事件处理id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个事件处理，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingId", dataType = "String", value = "事件处理id", paramType = "path")
    })
    Result<Integer> delete(String eventHandlingId);


    /**
     * 批量删除事件处理，彻底删除
     * @param eventHandlingIds 事件处理id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除事件处理，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingIds", dataType = "String[]", value = "事件处理id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] eventHandlingIds);


    /**
     * 根据事件处理id查询事件处理详情
     * @param eventHandlingId 事件处理id
     * @return 事件处理详情
     */
    @ApiOperation(value="根据事件处理id查询事件处理详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingId", dataType = "String", value = "事件处理id", paramType = "path")
    })
    Result<EventHandlingVO> findById(String eventHandlingId);


    /**
     * 查询事件处理
     * @param eventHandlingQuery 事件处理查询参数
     * @return page
     */
    @ApiOperation(value="查询事件处理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingQuery", dataType = "EventHandlingQuery", value = "事件处理查询参数", paramType = "query")
    })
    Result<List<EventHandlingListVO>> listAll(EventHandlingQuery eventHandlingQuery);


     /**
     * 分页查询事件处理
     * @param eventHandlingQuery 事件处理查询参数
     * @return page
     */
    @ApiOperation(value="分页查询事件处理")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "eventHandlingQuery", dataType = "EventHandlingQuery", value = "事件处理查询参数", paramType = "query")
    })
    Result<Page<EventHandlingListVO>> page(EventHandlingQuery eventHandlingQuery);


}

